package com.greenold.residing.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.greenold.residing.mapper.FloorMapper;
import com.greenold.residing.domain.Floor;
import com.greenold.residing.service.IFloorService;

/**
 * 楼层Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-15
 */
@Service
public class FloorServiceImpl implements IFloorService 
{
    @Autowired
    private FloorMapper floorMapper;

    /**
     * 查询楼层
     * 
     * @param id 楼层主键
     * @return 楼层
     */
    @Override
    public Floor selectFloorById(String id)
    {
        return floorMapper.selectFloorById(id);
    }

    /**
     * 查询楼层列表
     * 
     * @param floor 楼层
     * @return 楼层
     */
    @Override
    public List<Floor> selectFloorList(Floor floor)
    {
        return floorMapper.selectFloorList(floor);
    }

    /**
     * 新增楼层
     * 
     * @param floor 楼层
     * @return 结果
     */
    @Override
    public int insertFloor(Floor floor)
    {
        return floorMapper.insertFloor(floor);
    }

    /**
     * 修改楼层
     * 
     * @param floor 楼层
     * @return 结果
     */
    @Override
    public int updateFloor(Floor floor)
    {
        return floorMapper.updateFloor(floor);
    }

    /**
     * 批量删除楼层
     * 
     * @param ids 需要删除的楼层主键
     * @return 结果
     */
    @Override
    public int deleteFloorByIds(String[] ids)
    {
        return floorMapper.deleteFloorByIds(ids);
    }

    /**
     * 删除楼层信息
     * 
     * @param id 楼层主键
     * @return 结果
     */
    @Override
    public int deleteFloorById(String id)
    {
        return floorMapper.deleteFloorById(id);
    }
}
